package com.zhentao.user;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.pojo.par.dto.ChargeParOrdersDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.zhentao.model.pojo.user.ChargeUser;
import com.zhentao.model.pojo.user.gift.ChargeUserGift;
import com.zhentao.model.pojo.user.yichang.ChargeUserExpeciton;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.time.temporal.ChronoField;
import java.util.List;

/**
 * @ClassName: ChargeUserFeignApi
 * @Author: 振涛教育_Q
 * @Date: 2024/12/22 20:25
 */
@FeignClient(value = "charge-user" )
public interface ChargeUserFeignApi {

    /**
     * @param
     * @return com.zhentao.model.common.dtos.ResponseResult
     * @description 获取当前用户的可用积分 -- feign -- 接口
     * @author 振涛教育_小Q
     * @date 2024/12/22 20:29
     */
    @GetMapping("/auth/user/point/get")
    public ResponseResult getUserPoint(@RequestParam(value = "id",required = false) Long id);

    /**
     * @param point
     * @return com.zhentao.model.common.dtos.ResponseResult
     * @description 扣减库存
     * @author 振涛教育_小Q
     * @date 2024/12/26 16:38
     */
    @GetMapping("/auth/user/deduction/count")
    public ResponseResult getDeductionCount(@RequestParam(value = "point",required = false) Integer point
    ,@RequestParam(value = "userId",required = false) Long userId);



    /**
     * @param
     * @return com.zhentao.model.common.dtos.ResponseResult
     * @description 统计用户数量  和  用户的活跃度
     * @author 振涛教育_小Q
     * @date 2024/12/31 16:10
     */
    @GetMapping("/auth/user/info/count")
    public ResponseResult getUserCount();

    /**
     * @description  管理端  车辆信息管理列表
     * @author 大毅
     * @param chargeParOrdersDto
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @GetMapping("/auth/cars/chargeParOrders/list")
    ResponseResult chargeParOrdersList(ChargeParOrdersDto chargeParOrdersDto);

    /**
     * @description  管理端  车辆信息管理---删除
     * @author 大毅
     * @param id
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @DeleteMapping("/auth/cars/chargeParOrders/delete")
    ResponseResult chargeParOrdersDelete(Long id);


    @PostMapping("/auth/user/getUserList")
    public List<ChargeUser> getUserList();


    /**
     * @param userId
     * @return
     * @description 添加黑名单
     */
    @GetMapping("/auth/user/addBlackList")
    public ResponseResult addBlackList(@RequestParam(value = "userId", required = false) Integer userId);

    /**
     * @return
     * @description 获取用户信息
     */
    @GetMapping("/auth/user/getUserInfo")
    public ChargeUser getUserInfo(@RequestParam(value = "id", required = false) Long id);

    /**
     * @description 获取异常列表
     * @author Wl177
     */
    @GetMapping("/auth/user/getExceptionList")
    public List<ChargeUserExpeciton> getExceptionList();

    /**
     * @param exception
     * @description 异常处理
     */
    @PostMapping("/auth/user/updateException")
    public ResponseResult updateException(@RequestBody(required = false) ChargeUserExpeciton exception);

    /**
     * @description 获取奖品信息
     */
    @GetMapping("/auth/user/gift/getGifts")
    public ResponseResult getGifts();

    /**
     * @description 添加奖品信息
     * @param gift
     * @return
     */
    @PostMapping("/auth/user/gift/saveGift")
    public ResponseResult saveGift(@RequestBody(required = false) ChargeUserGift gift);

    /**
     * @description 修改奖品信息
     */
    @PostMapping("/auth/user/updateGift")
    public ResponseResult updateGift(@RequestBody ChargeUserGift gift);

    /**
     * @description 删除奖品信息
     */
    @PostMapping("/auth/user/{id}")
    public ResponseResult deleteGift(@PathVariable("id") Integer id);
}
